package com.woniu.airent.service.impl;

import com.woniu.airent.dto.CotenancyImgDto;
import com.woniu.airent.mapper.CotenancyImgMapper;
import com.woniu.airent.service.CotenancyImgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CotenancyImgServiceImpl implements CotenancyImgService {

    @Autowired
    CotenancyImgMapper cotenancyImgMapper;

    @Override
    public Integer addCotanancyImg(String houseNumber, String imgPath) {
        return cotenancyImgMapper.insertImg(houseNumber,imgPath);
    }

    @Override
    public List<CotenancyImgDto> findImgByHouseNumber(String houseNumber) {
        return cotenancyImgMapper.selectImg(houseNumber);
    }

    @Override
    public List<CotenancyImgDto> findAllImg() {
        return cotenancyImgMapper.selectAll();
    }
}
